package Observes;

import java.util.Observable;

/**
 * Created by arlen on 2017/1/14.
 */
public class Order extends Observable {
    private boolean flag=false;
    public void ordered(boolean flag){
        this.flag=flag;
        System.out.println("ordered a order");
        setChanged();
        notifyObservers();
        //错误写法
        addObserver(new SendGoods());
    }

}
